import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export const store = new Vuex.Store({
    state: {
        userInfo: {
            status: false,
            info: {}
        }
    },
    getters: {},
    mutations: {
        setUserInfo(state, payload) {
            if (!state.userInfo.status) state.userInfo.status = true;
            state.userInfo.info = payload;
        }
    },
    actions: {}
});